ansible 獲取主機組的主機數量 直接上列子吧: 比如有如下的一個hosts文件,我分別想獲取主機組master、node、cluster的主機數量 全局變量這樣定義: 得到結果分別是:3、1、4 ...